Skip to content

twamp: add timestamp diagnostic tool#3380

Merged
snormore merged 2 commits intomainfrom
snor/twamp-debug
Mar 27, 2026
Merged

twamp: add timestamp diagnostic tool#3380
snormore merged 2 commits intomainfrom
snor/twamp-debug

Conversation

@snormore
Copy link
Copy Markdown
Contributor

Summary of Changes

  • Add twamp-debug CLI tool for diagnosing kernel timestamping support on Arista switches
  • Tests each SO_TIMESTAMPING mode (RX/TX software/hardware/sched) by sending real TWAMP probes and checking whether timestamps are actually delivered in cmsgs, rather than just checking setsockopt acceptance
  • Sends configurable probe runs comparing userspace, SO_TIMESTAMPNS, SO_TIMESTAMPING software, and hardware timestamp sources side-by-side with per-probe breakdown and aggregate statistics (min/max/mean/p50/p99/stddev/jitter)

Diff Breakdown

Category Files Lines (+/-) Net
Core logic 1 +783 / -0 +783

Single-file diagnostic tool, no tests or scaffolding.

Key files (click to expand)
  • tools/twamp/cmd/twamp-debug/main.go — standalone debug tool: capability probing via real sends, multi-source RTT comparison, statistics

Testing Verification

  • Built and deployed to chi-dn-dzd1, verified against live TWAMP reflector on 172.16.0.3:862 over sw1_11_2
  • Confirmed capability detection correctly identifies TX_SCHED as delivered, TX_SOFTWARE/TX_HARDWARE/RX_HARDWARE as not delivered despite setsockopt accepting them
  • Verified 200-probe run produces consistent RTT statistics across userspace, kernel_ns, and software timestamp sources

@snormore snormore requested a review from ben-dz March 26, 2026 15:43
Standalone tool for checking kernel timestamping support on Arista
switches by sending real TWAMP probes and verifying which timestamp
types are actually delivered (SO_TIMESTAMPNS, SO_TIMESTAMPING RX/TX
software/hardware/sched). Also reports RTT statistics comparing
userspace vs kernel timestamp sources.
@snormore snormore requested a review from bgm-malbeclabs March 27, 2026 20:33
@snormore snormore marked this pull request as ready for review March 27, 2026 20:38
@snormore snormore enabled auto-merge (squash) March 27, 2026 20:38
@snormore snormore merged commit bdb6542 into main Mar 27, 2026
33 checks passed
@snormore snormore deleted the snor/twamp-debug branch March 27, 2026 20:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants